package com.cloud.basic.Advance.Design.Flyweight_Pattern;

/**
 * @program: basic
 * @description: 抽象享元类(棋子类)
 * @author: Cloud
 * @create: 2022/2/23 14:22:26
 */
public abstract class AbstractChessman {

    // 坐标
    protected int x;
    protected int y;

    // 黑/白
    protected String chess;

    public AbstractChessman(String chess){
        this.chess = chess;
    }

    // 点坐标位置
    public abstract void point(int x, int y);

    public void show(){
        System.out.println(this.chess + "(" + this.x + "," + this.y + ")");
    }

}
